package com.study.java.oop.callback;

/**
 * @Author: MuMu
 * @Date: 2024/3/28 19:32
 */
public class LiuLanQi {
    private String url;
    private CallBack callBack;

    public LiuLanQi(String url, CallBack callBack) {
        this.url = url;
        this.callBack = callBack;
    }

    public void request(){
        if (url.length()<3){
           callBack.error(ErrorCode.NOT_EXITS);
        } else {
            callBack.succeed();
        }
    }

}
